<template>
  <div class="selfdom">
    <div class="selfdomTao">
      <div class="self">
        <div class="v-hd2">
          <div class="yuanquan"></div>
          <span class="tit f-ff2 f-tdn">
            <router-link to='/find/newsongs'>新碟上架</router-link>
          </span>
          <span class="more">
            <router-link to='/find/newsongs'>更多</router-link>
          </span>
        </div>

        <div class="lunbo">
          <div
            class="left"
            @click="left"
          ></div>
          <div
            class="right"
            @click="left"
          ></div>

          <div
            class="TuTao"
            style="width:100px;height:100px;float:left"
            v-for="item in newDie05"
            :key="item.id"
            v-show="isBool"
          >
            <div class="Tu">
              <img
                :src="item.picUrl"
                alt=""
                style="width:100%;height:100%;"
              >
              <a
               href="javascript:;"
                class="msk"
              ></a>
              <a
              href="javascript:;"
                class="bofang"
              ></a>
            </div>
            <p class="Tcon">
              <a
            href="javascript:;"
                class="Tconten"
                style="color:#000"
              >{{item.name}}</a>
            </p>
            <p>
              <a
               href="javascript:;"
                style="color:#666;font-size:12px"
              >{{item.artists[0].name}}</a>
            </p>
          </div>

          <div
            class="TuTao"
            style="width:100px;height:100px;float:left"
            v-for="item in newDie510"
            :key="item.id"
            v-show="!isBool"
          >
            <div class="Tu">
              <img
                :src="item.picUrl"
                alt=""
                style="width:100%;height:100%;"
                class="HGtp"
              >
              <a
                href="javascript:;"
                class="msk"
              ></a>
              <a
              href="javascript:;"
                class="bofang"
              ></a>
            </div>
            <p
              class="Tcon"
              style="width:100px;height:20px;text-overflow: ellipsis;"
            >
              <a
                href="javascript:;"
                class="Tconten"
                style="width:100px;height:20px;color:#000;display:block;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;"
              >{{item.name}}</a>
            </p>
            <p>
              <a
               href="javascript:;"
                style="color:#666;font-size:12px"
              >{{item.artists[0].name}}</a>
            </p>
          </div>
        </div>

      </div>
    </div>
  </div>
</template>
<script>
export default {
 data: () => ({
   newDie:[],
   newDie05:[],
   newDie510:[],
   isBool:true

 }),
  created() {
    this.postnewDie()
  },
  methods: {
    async postnewDie(){
      try {
        const res=await this.Api.cyzApi.postnewDie()
        this.newDie=res.data.albums
        this.newDie05=res.data.albums.slice(0,5)
        this.newDie510=res.data.albums.slice(5,10)
      } catch (error) {
        alert("获取新碟失败"+error)
      }
    },
    left(){
      this.isBool=!this.isBool
    },
  }
};
</script>
<style lang="less">
.selfdom{
  .selfdomTao{
    .self{
      .v-hd2{
            margin-left: 17px;
        .more{
          position: absolute;
          right: 10px;
          color: #666666;
          line-height: 33px;
          font-size: 12px;
        }
      }
      .lunbo{
        position: relative;
        width: 687px;
        height: 186px;
        background: #f5f5f5;
        margin: 19px 0 0 17px;
        border: 1px solid #ccc;
        .left{
          position: absolute;
          top: 71px;
          left: 5px;
          width: 17px;
          height: 17px;
          background: url('../../../../assets/cyzimgs/xuebitu.png');
          background-position: -260px -75px;
        }
        .right{
           position: absolute;
          top: 71px;
          right: 5px;
          width: 17px;
          height: 17px;
          background: url('../../../../assets/cyzimgs/xuebitu.png');
          background-position: -300px -75px;
        }

        .TuTao{
          width:655px;height:200px;background:#ccc;margin-left:16px;padding:0px;
          position: relative;
          margin: 33px 0 0 29px;
          .Tu{
            .msk{
                  width: 118px;
              height: 100px;
                  position: absolute;
              top: 0;
              left: 0px;
              background: url('../../../../assets/cyzimgs/xuebitu2.png');
          background-position: 0 -570px;
          z-index: 5000;
            }
            .bofang{
              display: none;
                  left: 72px;
              width: 22px;
              height: 22px;
              background: url('../../../../assets/cyzimgs/xuebitu3.png');
              background-position: 0 -85px;
                  position: absolute;
            right: 10px;
            bottom: 5px;
            }
           
          }
          .Tu:hover{
            .bofang{
              display: block;
            }
          }
          .Tcon{
            .Tconten{
              font-size: 12px;
            }
          }
        }
        .el-carousel__container{
        position: relative;
        z-index: 5000;
      }
      .el-carousel__button{
        height: 6px;
        width: 6px;
        border-radius: 50%;
      }
      .el-carousel__arrow{
            width: 19px;
        height: 189px;
        border-radius: 1px;
      }
      .el-carousel__arrow--left{
        position: absolute;
        background: #f5f5f5;
        color: red;
        top: 93px;
        left: -3px;
        z-index: 10000;
      }
      .el-carousel__arrow--right{
       position: absolute;
        background: #f5f5f5;
        color: red;
        top: 93px;
        right: -3px;
        font-size: 18px;
        z-index: 10000;
      }
      }
    }
  }
}
</style>